package com.gdyzy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gdyzy.dto.UserDto;
import com.gdyzy.mapper.UserMapper;
import com.gdyzy.pojo.User;
import com.gdyzy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 通过手机号查找用户
     * @param phone 手机号
     * @return  用户
     */
    @Override
    public UserDto findByPhone(String phone) {
        return userMapper.findByPhone(phone);
    }
}
